<template>
    <view>
        <block name="vote">
            <view @tap="bindclosevote" class="cover"></view>
            <view :class="'vote_module w_100 bg_white ' + themes" style="height: auto; background-color: #fff" v-if="vote_flag == false">
                <view class="vote_title t_c h2" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'">
                    支持{{ xuan_name }}
                    <image @tap="bindclosevote" class="vote_close" src="/static/wxz_wzbagent/resource/images/icon3.png"></image>
                </view>
                <view
                    @tap="bindbuy"
                    :data-xuan_id="xuan_id"
                    :data-xuan_name="vote_info.name"
                    :data-index="vote_index"
                    class="gift_buy h3 rad_3 t_white t_c m_l_t"
                    :style="'color:' + (color_three ? color_three : '#fff') + ';background-color:' + (color_one ? color_one : '#C8AF82') + ';'"
                >
                    {{ columnsurs.award ? columnsurs.award : '为Ta投票' }}
                </view>
                <view class="vote_content">
                    <view class="vote_gift t_gray9 h4 t_c">
                        <view
                            @tap="bindchoosegift"
                            class="gift_item m_b"
                            :data-ballot="item.ticket"
                            :data-id="item.id"
                            data-type="bills"
                            v-for="(item, index) in bills"
                            :key="item.id"
                        >
                            <view class="gift_img rad_5" style="width: 100rpx; height: 100rpx; margin-left: 30rpx; border: 2rpx solid #ccc">
                                <image class="w_100 h_100 rad_5" :src="item.pic"></image>
                                <view
                                    class="gift_choose iconfont icon-xuanzhong"
                                    :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'"
                                    v-if="item.id == vote_gift_id"
                                ></view>
                            </view>

                            <view :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'">{{ item.ticket }}{{ columnsurs.zan ? columnsurs.zan : '票' }}</view>

                            <view class="gift_money" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'" v-if="item.amount == 0">免费</view>

                            <view class="gift_money" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'" v-else>￥{{ item.amount / 100 }}</view>
                        </view>
                    </view>
                    <!-- <view class="prize_title" style="background-color:{{themeColor.vote_layer.goods.bg}};color:{{themeColor.vote_layer.goods.header}};" wx:if="{{vote_product.goods}}">
                <view class="prize_title_txt">
                    <view class="prize_left_line" style="background-color:{{themeColor.vote_layer.goods.header}};"></view>
                    <view class="prize_right_line" style="background-color:{{themeColor.vote_layer.goods.header}};"></view>
                    投{{data.tip_text.tip_unit?data.tip_text.tip_unit:'票'}}
                </view>
            </view> -->
                    <!-- <view class="vote_gift vote_gift_num_{{vote_product.goods.length}} h4 vote_prize" style="background-color:{{themeColor.vote_layer.goods.bg}};" wx:if="{{vote_product.goods}}">
                <view bindtap="bindchoosegift" class="gift_item " data-ballot="{{item.vote_count}}" data-id="{{item.id}}" data-is_send="{{item.is_send}}" data-type="goods" wx:for="{{vote_product.goods}}" wx:key="id">
                    <view class="gift_img {{item.id==id?'active':''}} {{vote_product.goods.length>4?'goodsLength':''}}">
                        <image class="w_100 h_100" src="{{item.product_cover}}" wx:if="{{vote_product.goods.length<=4}}"></image>
                        <image class="w_100" mode="scaleToFill" src="{{item.product_cover}}" wx:else></image>
                        <view class="choose_img">
                            <view class="iconfont icon-gou" style="color:{{themeColor.vote_layer.goods.icon}};" wx:if="{{item.id==id}}"></view>
                        </view>
                    </view>
                    <view class="gift_gname" style="color:{{themeColor.vote_layer.goods.txt1}};">{{item.product_name}}</view>
                    <view class="gift_txt t_green" style="color:{{themeColor.vote_layer.goods.txt2}};">
                            {{item.vote_count}}{{data.tip_text.tip_unit?data.tip_text.tip_unit:'票'}}
                        </view>
                    <view class="gift_money" style="color:{{themeColor.vote_layer.goods.txt3}};">
                            {{item.money/100}}{{data.tip_text.tip_currency}}
                        </view>
                </view>
            </view> -->
                    <view class="gift_num_label w_100 h4 t_gray9 t_c m_b" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'">请选择礼物数量</view>
                    <view class="gift_num t_c b_all rad_3">
                        <view @tap="bindgiftnum" class="gift_btn fl" data-type="-1" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'">
                            <view class="iconfont icon-sub" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'"></view>
                        </view>
                        <view class="gift_txt fl h2" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'">
                            <input type="number" @input="bindchangenum" :value="vote_gift_num" style="height: 76rpx; line-height: 76rpx; width: 100%; text-align: center" />
                        </view>
                        <view @tap="bindgiftnum" class="gift_btn fl" data-type="1" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'">
                            <view class="iconfont icon-jiahao" :style="'color:' + (color_one ? color_one : '#C8AF82') + ';'"></view>
                        </view>
                    </view>
                    <!-- <text class="buy_txt" style="color:#C8AF82;"></text> -->
                </view>
            </view>

            <!-- <view class="prompt bg_white" wx:if="{{flag==true}}">
        <view class="prompt_bg">
            <image class="prompt_header" src="../../statics/image/icon37.png"></image>
            <image bindtap="bindclosevote" class="prompt_close" src="../../statics/image/icon32.png"></image>
            <image class="prompt_img" src="{{banner_img?banner_img:''}}" wx:if="{{banner_img}}"></image>
            <text class="prompt_tip h3 t_gray6 t_c m_t">{{vote_gift_type=='goods'?vote_gift_is_send==1?'您的礼物已经在准备':'您的礼物需要到店兑换':vote_success_msg}}</text>
            <text class="prompt_tip h3 t_gray6 t_c m_b" wx:if="{{vote_gift_type=='goods'}}">{{vote_gift_is_send==1?'请填写收货地址~':'可以前往我的订单页面查看'}}</text>
            <view bindtap="my" class="prompt_btn bg_green t_c t_white h3 rad_3" style="background-color:#FFAE21" wx:if="{{vote_gift_type=='goods'}}">{{vote_gift_is_send==1?'填写收货地址':'查看我的订单'}}</view>
            <view bindtap="bindclosevote" class="prompt_btn bg_green t_c t_white h3 rad_3" style="background-color:#FFAE21" wx:else>确定</view>
            <view bindtap="toMini" class="banner_img" data-appid="{{banner.appid}}" data-extra="{{banner.extra}}" data-path="{{banner.link}}" wx:if="{{banner}}">
                <image src="{{banner.image}}"></image>
            </view>
            <cover-view class="agg_img m_t" wx:if="{{banner==undefined&&agg}}">
                <ad unitId="{{agg}}"></ad>
            </cover-view>
        </view>
    </view> -->
        </block>
    </view>
</template>

<script>
export default {
	props:[
		
	],
    data() {
        return {
            themes: '',
            vote_flag: false,
            color_one: false,
            xuan_id: '',

            vote_info: {
                name: ''
            },

            vote_index: 0,
            color_three: false,

            columnsurs: {
                award: false,
                zan: false
            },

            bills: [],
            vote_gift_id: '',
            vote_gift_num: 0
        };
    },
    methods: {
        bindclosevote() {
            console.log('占位：函数 bindclosevote 未声明');
        },

        bindbuy() {
            console.log('占位：函数 bindbuy 未声明');
        },

        bindchoosegift() {
            console.log('占位：函数 bindchoosegift 未声明');
        },

        bindgiftnum() {
            console.log('占位：函数 bindgiftnum 未声明');
        },

        bindchangenum() {
            console.log('占位：函数 bindchangenum 未声明');
        }
    }
};
</script>
<style>
@import '@/wxz_wzbagent/pages/vote/index.css';
</style>
